Decoding video signals to separate luma and chroma components

ABSTRACT

Provided are decoding methods and decoders for separating luminance and chrominance components of a video signal. In one aspect, a reference subcarrier of a first line of the video signal is used for subsequent lines by applying an appropriate rotation to the reference subcarrier of the first line for each subsequent line. In another aspect, comb filtering is adaptively controlled based on determining whether 90 or 180 degrees relationship is maintained from line to line. In a further aspect, both complimentary and non-complimentary comb filtering are implemented. In yet another aspect, SECAM bell filtering is achieved by rotating the video signal to obtain a baseband signal, low-pass filtering and modulating the baseband signal, and subtracting the modulated low-pass filtered baseband signal from the video signal to notch the chroma component from the luma component.

RELATED APPLICATIONS

The present application is a divisional of U.S. application Ser. No.10/776,075, filed Feb. 11, 2004, now U.S. Pat. No. 7,227,585 whichclaims the benefit of U.S. provisional patent application Ser. No.60/533,294, filed Dec. 30, 2003, which are hereby fully incorporated byreference in the present application. This application relates to U.S.patent application Ser. No. 10/776,121, now U.S. Pat. No. 7,167,213,filed concurrently with the present application, entitled “Comb FilterDesign for Separating Luminance and Chrominance in Video Signals”, whichis hereby fully incorporated by reference in the present application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to video signal decoders and,more specifically, to methods and systems for separating luminance andchrominance in composite signals.

2. Related Art

Generally, video pictures or video signals are made up of video contentsignals, horizontal sync pulses and vertical sync pulses. Typically, avideo picture includes a number of video frames. For example, accordingto the NTSC (National Television System Committee) format, there are 30frames per second, and according to the PAL (Phase Alternation by Line)format, there are 25 frames per second. At the end of each frame, avertical sync pulse is transmitted which indicates to a recipientelectronic device that the frame has come to an end. Further, each videoframe is made up of lines. In NTSC, there are 525 lines per frame,whereas, in PAL, there are 625 lines per frame. Each point in the linereflects the intensity of the video signal. At the end of each line, ahorizontal sync pulse is transmitted which indicates to the recipientelectronic device that the line has come to an end, so that theelectronic device gets ready for the next line.

The screens of most monitors of electronic devices are drawn in a seriesof lines, left to right and top to bottom. When the monitor finishesdrawing one line and reaches its right-most excursion, the beam isturned off while the monitor returns the beam to the left side of thescreen. A similar process occurs when the last line on the screen isfinished drawing, in which event, the beam traverses to the top leftcorner of the screen. In a video picture, the beam is moved to the leftof the screen and to the top of the screen in accordance with and basedon the detection of the synchronization signals. In other words, whenthe vertical sync pulse is detected the beam moves to the top leftcorner of the screen to begin drawing the next frame, and when thehorizontal sync pulse is detected, the beam moves to the left of side ofthe screen to begin drawing the next line. Accordingly, it is quiteimportant to properly detect the sync pulses.

Due to limitations on available bandwidth and the increased demand totransmit additional information on existing bandwidth, it is oftennecessary to multiplex or combine two or more information signals into asingle composite signal.

A color television signal is an example of a composite signal. A colortelevision signal comprises a luminance (brightness) component and achrominance (color) component. These components are often represented asY and C components wherein Y represents the luminance component and Crepresents the chrominance component.

Originally, broadcast television in the United States began with blackand white broadcast and therefore lacked the chrominance component, C,of modern television's composite signal. Television standards andtechnology required that the black and white television signal, that is,the luminance component (Y), reside within 6 megahertz (MHz) ofbandwidth space.

Eventually, however, technology advanced to provide color television. Toallow black and white televisions to receive the new color signalbroadcast, the color signal standard located the color informationwithin the same 6 MHz of bandwidth space allotted to each channel of theblack and white signal. Under this standard, the color informationoverlaps with the luminance information.

FIG. 1A illustrates a composite television signal on a coordinate systemin which the horizontal axis 100 represents frequency and the verticalaxis 102 represents amplitude. Signal line 104 represents the luminanceinformation (Y) while line 106 represents the chrominance information(represented as I and Q) of the composite signal. As shown, thefrequencies of these signals 104, 106 overlap. In an NTSC (NationalTelevision Standards Committee) system, the luminance informationoccupies the range DC to 4.2 MHz of bandwidth while the chrominancesignal is bandlimited to the range approximately 0.6 to 1.3 MHz and ismodulated onto a carrier at 3.58 MHz. The audio portion of the signal isat 4.5 MHz. While these two data signals conveniently fit within the 6MHz of bandwidth space they are allotted, obvious decoding challengesare presented in order to separate the luminance information from thechrominance information.

FIG. 1B illustrates video signal line 120, which includes horizontalfront porch 122, horizontal sync pulse 124, horizontal back porch 128,color burst 126 and horizontal active pixels 130. As shown, video signalline 120 begins at the falling edge of horizontal sync pulse 124 andends at the falling edge of the next horizontal sync pulse. Horizontalfront porch 122 is the period of time between the previous horizontalactive pixels (not shown) and the beginning of horizontal sync pulse122. Horizontal sync pulse 122 is a change in voltage of the videosignal, which triggers the electronic device to stop the rightwardprogress of drawing the beam and begin drawing on the left side of thescreen. Thus, each line begins with the start of the horizontal syncpulse and ends with the start of the next horizontal sync pulse.Horizontal back porch 128 is the period of time between the end ofhorizontal sync pulse 124 and the beginning of horizontal active pixels130. According to NTSC and PAL formats, horizontal back porch 128 alsoincludes color burst 126, as a color calibration reference.

The first decoding scheme adopted to separate the overlapping luminance(Y) and chrominance (C) signals comprises simple notch filtering incombination with band pass filtering. FIG. 2 illustrates a block diagramof a basic notch filter 152 and band pass filter 154. An incomingcomposite signal on line 150 is presented to both of the notch filter152 and the band pass filter 154.

FIG. 3 illustrates the frequency response of a notch filter 152 and aband pass filter 154. The output of the notch filter generally comprisesthe luminance portion 174 of the composite signal while the output ofthe band pass filter generally comprises the chrominance portion 176 ofthe composite signal.

In particular, for NTSC video, the notch filter removes a portion of thecomposite signal centered at 3.58 MHz, but allows the remainder 174 topass. While the notch filter 152 allows the majority of the luminanceinformation 174 to pass, it undesirably removes components of theluminance signal having frequencies within the range of the notchfiltered frequencies 177. The notch filtered frequencies that areremoved range from 2.5 to 4.5 MHz. Stated another way, the notch filterallows the frequency band below 2.5 MHz and the frequency band above 4.5MHz to pass.

The band pass filter 154 configured to operate in accord with the NTSCstandard video allows a 2 MHz portion of the composite signal centeredat 3.58 MHz to pass while removing portions outside of this band. Thisportion of the composite signal contains all the chrominanceinformation. Undesirably, however, the output of the band pass filteralso contains luminance components having frequencies within the bandpass filter's frequency band.

Notch and band pass filtering suffers from numerous drawbacks as caneasily be understood with reference of FIG. 3. In particular, the bandpass filtered chrominance portion of the composite signal also containsluminance information, i.e., band pass filtering does not remove allluminance information from the chrominance signal. The unwantedluminance information in the chrominance signal introduces artifactsinto the video image. This is most noticeable in pictures that containclosely spaced black and white lines, such as when the video display isof person is wearing a herringbone jacket.

Likewise, notch filtering the composite signal to remove the chrominanceinformation from the composite signal to obtain the luminanceinformation removes valuable portions of the luminance signal. A loss ofluminance information is especially critical due to the human eye'ssensitivity to brightness and contrast variations in a projected image.

FIG. 4 illustrates a conventional basic comb filter. In operation, acomposite signal arrives at input 230 and branches into a line store232, a first summing point 234 and a second summing point 236. The linestore delays the incoming composite signal for a time equivalent to theperiod of one line. Further, some methods and systems utilizing combfilters for YC separation are described in U.S. Pat. No. 6,175,389,entitled “Comb Filtered Signal Separation”, issued Jan. 16, 2001, whichis hereby incorporated by reference in its entirety.

In regions of the video image where the Y, I, and Q components on oneline are the same as the previous line, the composite signal for oneline is similar to the composite signal for the previous line. However,differences in phase do exist. The luminance portion of the compositesignal is the same for both lines, but the chrominance portion of thecomposite signal for one line is phase shifted by 180 degrees comparedto the chrominance portion of the composite signal for the previousline. This occurs because the subcarrier is phase shifted by 180 degreesrelative to the previous line. With reference to FIG. 4, these phasedifferences and the additive and subtractive properties of the feedaround loop cause the unwanted portions of the chrominance and luminancesignals to cancel. The luminance signal is provided on a line 238 andthe chrominance signal provided on a line 240.

Conventionally, comb filters have a frequency response configured tofilter out a particular repeating frequency pattern in signals that areoffset in time. The frequency response of a comb filter is illustratedin FIGS. 5A and 5B. The horizontal axis 250 represents frequency and thevertical axis 252 represents filter response in dB. As shown in FIG. 5A,the comb filter frequency response for the luminance portion (Y) of thesignal is represented by line 254. Similarly, FIG. 5B illustrates thecomb filter frequency response for the chrominance portion (C) of thesignal, represented by line 256. In effect, the comb filter acts as anotch filter with a plurality of combs or teeth centered on or alignedwith the frequency components of the desired signal. Because of itsconfiguration, the comb filter excels in situations where the compositesignal is stable or consistent from line-to-line such as, for example,in an area of solid color. Undesirably, however, at portions of a signalrepresenting vertical transitions between colors or areas of motion inthe video image, the comb filtering technique is undesirable, becauseconventional comb filtering creates artifacts at vertical transitionsbetween differing colors and adjacent to moving objects.

A further drawback of utilizing conventional comb filters is that suchfilters are sensitive to imperfections in the line-to-line subcarrierphase difference. This sensitivity results from the line store 232 andthe summing points 234, 236 in the comb filter. Subcarrier phasedifferences occur when the phase between the current signal and a linestored signal is other than 180 degrees out of phase. In such asituation, rather than perfectly adding or canceling at the summingpoints 234, 236, the signals, being out of phase, combine inaccuratelyand provide inaccurate luminance and chrominance signals.

Therefore, there is a need for methods and systems for a more robustseparation of luminance and chrominance components of composite signalswithout great additional cost and complexity.

SUMMARY OF THE INVENTION

In accordance with the purpose of the present invention as broadlydescribed herein, there are provided decoding methods and decoders forseparating luminance and chrominance components of a video signal. Inone aspect, a reference subcarrier of a first line of the video signalis used for subsequent lines by applying an appropriate rotation to thereference subcarrier of the first line for each subsequent line. Inanother aspect, comb filtering is adaptively controlled based ondetermining whether 90 or 180 degrees relationship is maintained fromline to line. In a further aspect, both complimentary andnon-complimentary comb filtering are implemented. In yet another aspect,SECAM bell filtering is achieved by rotating the video signal to obtaina baseband signal, low-pass filtering and modulating the basebandsignal, and subtracting the modulated low-pass filtered baseband signalfrom the video signal to notch the chroma component from the lumacomponent.

According to one aspect, there is provided a method of obtaining areference subcarrier in each of a plurality of video signal lines fordemodulating a chrominance portion of each of the plurality of videosignal lines into U and V components. The method comprises locking ontoa first reference subcarrier of a first video signal line of theplurality of video signal lines; demodulating the chrominance portion ofthe first video signal line into first U and V components using thefirst reference subcarrier; and obtaining each of the referencesubcarrier in each of subsequent the plurality of video signal lines byrotating the first reference subcarrier for a predetermined number ofdegrees. In a further aspect, the predetermined number of degrees is 90degrees or 180 degrees. In another aspect, the obtaining each of thereference subcarrier in each of subsequent the plurality of video signallines includes inversion, sin/cos swapping low pass filtering of thefirst reference subcarrier.

In a separate aspect, a method is provided for controlling a comb filterfor comb filtering a plurality of video signal lines to demodulate achrominance portion of each of the plurality of video signal lines intoU and V components. The method comprises determining a first referencesubcarrier of a first video signal line of the plurality of video signallines; demodulating the chrominance portion of the first video signalline into first U and V components using the first reference subcarrier;using the first U and V components to determine a number of degrees ofrotation of the first reference subcarrier from a second referencesubcarrier of a second video signal line previous to the first videosignal line; and disabling the comb filter if the number of degrees isdifferent from a predetermined number of degrees. In a further aspect,the predetermined number of degrees is 90 degrees or 180 degrees. Inanother aspect, the method further comprises enabling the comb filter ifthe number of degrees is the same as a predetermined number of degrees.

In another separate aspect, there is provided a method of decoding avideo signal including a first video signal line and a second videosignal line using a luma comb filter and a chroma comb filter. Themethod comprises obtaining a first chroma data for a first video signalline using the chroma comb filter; obtaining a second chroma data for asecond video signal line using the chroma comb filter, wherein the firstvideo signal line is adjacent to the second video signal line; obtaininga first luma data for a first video signal line using the luma combfilter; obtaining a second luma data for a second video signal lineusing the luma comb filter; using the chroma comb filter and the lumacomb filter in a complimentary mode if there is correlation between thefirst chroma data and the second chroma data and there is no correlationbetween the first luma data and the second luma data; and using thechroma comb filter and the luma comb filter in a non-complimentary modeif there is correlation between the first chroma data and the secondchroma data and there is correlation between the first luma data and thesecond luma data. In a further aspect, the method further comprisesdisabling the chroma comb filter and the luma comb filter if there is nocorrelation between the first chroma data and the second chroma data andthere is no correlation between the first luma data and the second lumadata.

In a separate aspect, there is also provided a method of SECAM bellfiltering a video signal to separate a luma component from a chromacomponent of the video signal. The method comprises rotating the videosignal down to baseband using a chroma demodulator to obtain a basebandsignal; low-pass filtering the baseband signal to generate a low-passfiltered baseband signal; modulating the low-pass filtered basebandsignal to generate a modulated low-pass filtered baseband signal; andsubtracting the modulated low-pass filtered baseband signal from thevideo signal to notch the chroma component from the luma component. In afurther aspect, the method further comprises applying a bell filter tothe modulated low-pass filtered baseband signal.

According to other aspects, systems, devices and computer softwareproducts or media for decoding video signals in accordance with theabove techniques are provided.

These and other aspects of the present invention will become apparentwith further reference to the drawings and specification, which follow.It is intended that all such additional systems, methods, features andadvantages be included within this description, be within the scope ofthe present invention, and be protected by the accompanying claims.

BRIEF DESCRIPTION OF DRAWINGS

The features and advantages of the present invention will become morereadily apparent to those ordinarily skilled in the art after reviewingthe following detailed description and accompanying drawings, wherein:

FIG. 1A illustrates a conventional frequency plot of the components of acomposite video signal;

FIG. 1B illustrates a typical video signal line, including horizontalfront porch, horizontal sync pulse, horizontal back porch, color burstand horizontal active pixels;

FIG. 2 illustrates a conventional block diagram of a combined notch andband pass filter;

FIG. 3 illustrates a conventional plot of the frequency response of anotch and band pass filter configured to filter a composite videosignal;

FIG. 4 illustrates a conventional block diagram of a basic comb filter;

FIG. 5A illustrates a conventional plot of the frequency response of acomb filter configured to separate the luminance components of acomposite signal;

FIG. 5B illustrates a conventional plot of the frequency response of acomb filter configured to separate the chrominance components of acomposite signal;

FIG. 6 illustrates a luminance and chrominance separation system,according to one embodiment of the present invention;

FIG. 7 illustrates a memory storage for use in the luminance andchrominance separation system of FIG. 6;

FIG. 8A illustrates a comb filter error calculator for use in the NTSCmode of the luminance and chrominance separation of FIG. 6; and

FIG. 8B illustrates a comb filter error calculator for use in the PALmode of the luminance and chrominance separation of FIG. 6.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present invention may be described herein in terms of functionalblock components and various processing steps. It should be appreciatedthat such functional blocks may be realized by any number of hardwarecomponents and/or software components configured to perform thespecified functions. For example, the present invention may employvarious integrated circuit components, e.g., memory elements, digitalsignal processing elements, filters, controllers, comparators, counters,adders, gain controls, logic elements, and the like, which may carry outa variety of functions under the control of one or more microprocessorsor other control devices. Further, it should be noted that the presentinvention may employ any number of conventional techniques for datatransmission, signaling, signal processing and conditioning, sampling,filtering, and the like. Such general techniques that may be known tothose skilled in the art are not described in detail herein.

It should be appreciated that the particular implementations shown anddescribed herein are merely exemplary and are not intended to limit thescope of the present invention in any way. Indeed, for the sake ofbrevity, conventional analog and digital circuits, circuit components,filters, integrators, controllers, comparators, counters, datatransmission, signal processing and other functional aspects of the datacommunication system (and components of the individual operatingcomponents of the system) may not be described in detail herein.Furthermore, the connecting lines shown in the various figures containedherein are intended to represent exemplary functional relationshipsand/or physical couplings between the various elements. It should benoted that many alternative or additional functional relationships orphysical connections might be present in a practical communicationsystem.

With reference to FIG. 6, an architecture overview ofluminance/chrominance (Y/C) separation system 600 is provided inaccordance with one embodiment of the present invention. Y/C separationsystem 600 separates a composite input into its luminance (or luma), U,and V components. For S-video inputs, the chrominance (or chroma) datawill be demodulated into its U and V components. As such, Y/C separationsystem 600 performs both luma/chroma separation and chroma demodulation.

In one embodiment, Y/C separation system 600 is a 5-line (not shown)adaptive comb filter, with fallback to a simple notch filter. The notchfilter also has a special mode for SECAM. The comb filter implements twoalgorithms, one algorithm for NTSC and one algorithm for PAL, becausethe NTSC color carrier has a 180-degree phase shift between adjacentlines, while the PAL color carrier has only a 90-degree phase shiftbetween adjacent lines. It should be noted that these and otheralgorithms can be stored in various memory components and executed bycontroller(s) that are not shown or described in detail herein, sincesuch implementations are within the knowledge of those of ordinary skillin the art.

A conventional NTSC comb filter performs the comb operation on thecomposite signals and bandpass filtered signals, and would thendemodulate the separated chroma. However, the 90-degree phase shift andthe phase switch of PAL pose unique challenges with this conventionalapproach. In contrast, in one embodiment of the present invention, Y/Cseparation system 600 first demodulates the chroma into U and Vcomponents directly from the composite signal, before applying the comboperations. This means that the comb operation would operate on basebandUN signals, rather than bandpass filtered chroma signals.

Chroma demod module 610 implements a standard QAM demodulation approachby multiplying the composite signal by reference quadrature sine waves,thereby rotating the U and V content to baseband. Chroma demod module610 includes the color burst locking loop, reference subcarriergeneration, and the QAM demod functionality. The output is low-passfiltered to remove both the image frequencies and the extraneous lumafrequencies. This also has the advantage of eliminating a more complexbandpass filter. Further, dependencies on the PAL phase switch areinherently removed in the process.

The comb filter operation is basically a sum or difference operation ontwo lines of the video sequence. The sum or difference will reinforceone component and cancel out the other, because the chroma componentswill have 180-degree phase changes between adjacent lines for NTSC, orevery two lines for PAL. Accordingly, the two lines may be summed toobtain the luma channel, or subtracted to obtain the chroma channel. Ifboth comb operations are performed independently on the demodulated andcomposite signals, the outputs are called non-complementary outputs,meaning one cannot necessarily sum the resultant luma and chromacomponents to obtain the original composite input. To obtaincomplementary outputs, one can perform only one of the comb operations,and obtain the other channel by subtracting the result from the currentline's composite signal. These are complementary because the luma andchroma can be summed to produce the composite input.

In one embodiment, Y/C separation system 600 provides both a luma combfilter and a chroma comb filter to allow both approaches. A superiorresult may be obtained by using dual chroma and luma comb filters toproduce non-complementary outputs.

Further, Y/C separation system 600 is adaptive and decides, on apixel-by-pixel basis, whether a notch approach, a chroma combcomplementary approach, or a dual chroma-luma approach will produce thebest results. One adaptive algorithm of the present invention takesadvantage of a total of five lines, which stores four lines of data.

Further, if Y/C separation system 600 operates in the complementarymode, the chroma must be subtracted from the composite waveform. To thisend, the U/V components must be first re-modulated back to theiroriginal frequencies around the chroma carrier, which is performed bychroma remodulation module 625. If Y/C separation system 600 operates inthe non-complementary mode, chroma remodulation module 625 is disabledand the luma is passed straight through.

In SECAM mode, Y/C separation system 600 will be bypassed and only anotch filter approach is utilized to separate the luma and chromafrequency bands. As for NTSC and PAL, the composite waveform will berotated down to baseband in chroma demod module 610. However, in SECAM,unlike NTSC and PAL, the subcarrier loop operates at a fixed frequency,and does not try to lock to a burst reference. After low-pass filtering,the chroma band will be remodulated and subtracted from the compositesignal, effectively notching the chroma from the luma. This quadraturebaseband representation of the SECAM FM modulated carrier is then passedthrough SECAM Bell filter 630. SECAM Bell filter 630 is a complex filterthat implements the inverse of the FM de-emphasis filter that is appliedto the carrier before transmission. Of course, SECAM Bell filter 630 isbypassed in NTSC or PAL modes.

As explained above, a comb filter takes advantage of the 180° (NTSC) or90° (PAL) phase shift in the color subcarrier from line to line or frameto frame to recover luminance data from the bandwidth occupied by thechrominance data, and remove residual subcarrier from the luminancechannel. Y/C separation system 600 can support both a 3D (multipleframe) motion adaptive comb filter, and a 2D (multiple line) adaptivecomb filter. In applications requiring a 3D comb filter, an externaldouble frame store memory can be used.

For both 3D and 2D applications, memory or storage 605 provides aninternal four-line memory. Both the 3D and 2D comb filters can be usedin either complimentary mode (where the comb filtered chroma issubtracted from the composite signal) or non-complimentary (where aseparate luma comb removes the color across the entire compositebandwidth.)

Since determining the difference between chrominance error and recoveredluma is not possible when the chroma is shifted 180° relative to theluma, comb filter decisions are based on either in phase pixels in thecase of NTSC, or orthogonal pixels in the case of PAL. Y/C separationsystem 600 stores two frames in a frame store memory area and four linesin a line store memory area of storage 605.

For the 3D comb filter, Y/C separation system 600 uses both the datafrom two past frames as well as the data from one past frame to detectmotion in the picture, and then uses the data from one past frame toperform the comb filtering operations. When motion is detected, the 3Dcomb filter falls back to the 2D comb filter. This architecture providesrobust behavior in the presence of motion, and excellent separation forstatic images.

Turning to FIG. 7, storage 605 of FIG. 6 is shown in more detail inaccordance with one embodiment of the present invention. As shown,storage 700 includes two-frame store 710 and four-line store 715.Storage 700 receives current line 705, which is then directed forstorage in both two-frame store 710 and four-line store 715. Storage 700enables Y/C separation system 600 to operate on two previous frames,namely −1 frame 712 and −2 frame 714, and four previous lines, namely −1line 716, −2 line 717, −3 line 718 and −4 line 719, concurrently, toselect the best data to use for separation on pixel-to-pixel basis.Because data is stored in composite format in storage 700, Y/Cseparation system 600 performs the comparisons in the demodulated colorspace (UV color space) and composite or luma color space, which providesthe ability to consider both color spaces simultaneously to determinewhether or not to use the comb filter.

In one embodiment of the present invention, four-line store 715 may be asingle port RAM, including four lines of composite data and the detectedhorizontal sync bit. To accommodate the PAL square pixel mode, whichrequires the most amount of memory, the RAM may include 3776×11 bits,which is 4 lines multiplied by 944 samples per line, where each sampleincludes 10 bits and one bit is used for the horizontal sync detect.

Chroma demodulation 612 is used to recover chroma U and V data from themodulated chrominance information. For CVBS signals, all the lines andframes are demodulated separately in order to avoid having to store UVand CVBS data. For S-Video signals, only the current line needs to bedemodulated since the comb filter is not active. For YUV signals, thereis no need for demodulation, but the low pass filter is still used toupsample the multiplexed UV data to the nominal sample rate. Themodulated chrominance information can be represented as:chrominance=U sin ωt+V cos ωt

The U data is obtained by multiplying the chrominance information by (2sin ωt), while V data is obtained by multiplying the chrominanceinformation by (2 cos ωt), where ω=2πF_(sc).U=(U sin ωt+V cos ωt)(2 sin ωt)=U−(U cos 2ωt)+(V sin 2ωt)V=(U sin ωt+V cos ωt)(2 cos ωt)=V+(V cos 2ωt)+(U sin 2ωt)

The Quadrature Amplitude Modulation or (QAM) modulation requires aprecise phase lock to the original carrier signal. A digital PhaseLocked Loop (PLL), which is discussed below, in combination with areference burst provided during the back porch portion of the videosignal, provides a phase locked carrier for the chroma demodulation 612.In one embodiment, PLL is locked to the current line, with all otherlines slaved to it. Since adjacent lines have a different phase than thecurrent line, a phase adjust block provides the 90° (PAL only), or 180°shift through simple inversion and sin/cos swapping. The 2ωt componentsare then removed by low pass filters, which also bandwidth limit thechroma signal. This approach, inter alia, limits the luma artifactsgenerated by the comb filtering process. In YUV mode, zeros are insertedbetween every input sample, doubling the data rate. The resulting signalimage is then filtered out by low pass filters having selectablebandwidth.

The demodulation signal must have the exact same phase and frequency asthe modulation subcarrier originally used by the encoder in order toproperly decode the color information. A reference color burst is addedto the back porch region of the signal, so that a PLL or subcarriergenerator 614 may generate this subcarrier. In one embodiment,subcarrier generator 614 includes a phase detector, a loop filter and adiscrete time oscillator.

Since the data is stored in storage 605 as composite video, which is acombination of lumas and chromas, current line 705 includes a referencesubcarrier. Y/C separation system 600 uses subcarrier generator 614 tolock on that reference subcarrier and use that reference subcarrier togenerate a signal to demodulate chroma portion to its U and Vcomponents. Y/C separation system 600 obtains the reference subcarrierfor the current line and applies a vector rotation of 90 or 180 degreesrotation to the reference subcarrier of the current line for use withall other points without tracking the subcarrier for each point.

The phase detector of subcarrier generator 614 produces a signed valueproportional to the phase difference between the subcarrier and thecolor burst reference. The low pass filtered UV data is fed to a pair ofintegrators that accumulate during the burst gate. This gate is openedfor four pixels after a programmable delay from the falling edge of thedetected horizontal sync. The output of these accumulators is fed into atwo line averaging filter, which is needed since the burst in PAL modealternates between 135° and 225° on adjacent lines. This produces a +Vand −V component of equal magnitude on adjacent lines. Averaging any twolines should thus produce a zero V component. This alternation of thesign of the V component is also used to detect the presence of PALsignals and the phase of the V switch. The U phase error component isadded to the V if V is positive, and subtracted if V is negative so thatit always increases the magnitude of the error.

Even though the phase difference from line to line is 90° (for PAL) or180° (for NTSC), certain systems, such as some VCRs, do not adhere tothis standard, i.e. subcarrier phase compared to line. Y/C separationsystem 600 examines the U and V values of the color burst portion, i.e.the subcarrier phase, to determine whether there is a 90° or 180°relationship from line to line, and if such relationship does not exist,Y/C separation system 600 disables the comb filtering operation.

The loop filter of subcarrier generator 614 is a second order low passfilter with one pole and one zero. When combined with the pole from thediscrete time oscillator, the overall response is a first order low passfilter with peaking around the cutoff frequency.

The discrete time oscillator of subcarrier generator 614 is used togenerate an address that cycles through the Sine Cosine ROM at thefrequency of the subcarrier. To enable the discrete time oscillator totrack changes, a factor is used to modify the basic frequency. Also, anerror signal generated by the phase detector and the loop filter is usedin NTSC and PAL to modify the basic frequency allowing the frequency tolock to the color burst reference. However, SECAM does not use sucherror signal, since a free running oscillator is used in that mode.

Subcarrier generator 614 a chroma killer logic to remove the chrominanceinformation if its amplitude is too low. The chroma killer logicmonitors four U pixels that are accumulated during the color burst. Theideal accumulated U value is −28.0×4=−112.0 (S10.2) for NTSC and−20.75×4=−83.0 (S10.2) for PAL. If the accumulated U value has a smallermagnitude than (more positive than) −8.0 (7% NTSC, 10% PAL) for 127consecutive lines, a signal is asserted. This signal is used by a chromaAGC logic to force the gain value to zero. If the accumulated U valuehas a greater magnitude than (more negative than) −16.0 (14% NTSC, 19%PAL) for 127 consecutive lines, the signal will be deasserted.

In PAL, the phase of V is reversed every other line. subcarriergenerator 614 includes a PAL switch logic for generating a PAL switchsignal that alternates each line to show when the phase of V isreversed. This occurs by monitoring the sign of the V data during thecolor burst reference. The PAL switch signal is generated to be low whenthe sign of V is positive (V phase is not reversed) and high when thesign of V is negative (V phase is reversed). If the PAL switch logicever detects that the PAL switch signal is out of synchronization withthe sign of V, the PAL switch logic monitors the V sign for 12consecutive lines before resynchronizing the PAL switch signal.

Subcarrier generator 614 includes a subcarrier lock logic, whichgenerates a subcarrier lock signal for use as a status bit to indicatewhether or not the subcarrier tracking loop is locked. The subcarrierlock logic has 16 lines of hysteresis. To accomplish the hysteresis, acounter is updated for each line based on the magnitude of the V error.When the magnitude of the V error is less than 32, the counter willincrement up to a maximum of 15. At this time the subcarrier lock signalwill be asserted. When the magnitude of the V error is greater than orequal to 32, the counter will decrement to a minimum of zero, where thesubcarrier lock signal will be deasserted.

Continuing with FIG. 6, Y/C separation system 600 includes chroma combfilter 615, which uses simple addition and subtraction to determine thepixels with the highest degree of correlation with the current pixel andto extract the chrominance from these pixels. Since each sample includesluma and chroma components, the difference between two pixels could bedue to either luminance or chrominance difference, and there is notsufficient information to distinguish them. Thus, chroma comb filter 615determines the combination of pixels in which the total difference isthe smallest, and uses that information to extract the chroma component.Since on each adjacent line or frame chroma is out of phase with thecurrent line, that means that subtracting the two pixels does not leadto the difference between the pixels, but rather the luma component plusthe difference.

In the NTSC mode, the addition of another pair of lines gives access totwo lines that are in phase with the current line, which makes a truecomparison possible. Similarly, another frame store gives access to anin-phase pixel for the 3D comb filter. In the PAL mode, the additionallines (or frame) are 180° out of phase with the current line, whichmakes it similar to the NTSC mode before the additional storage.

FIG. 8A illustrates input line A and four stored lines B, C, D and E, inthe NTSC mode. As shown, there is a 180° phase difference between A andB, B and C, C and D, and D and E. Further, lines that are two apart havethe same phase. In one embodiment of the present invention, in order toperform the error calculation in the NTSC mode, pixels that are twolines apart are used for error correction. For example, the differencesbetween lines A and C, B and D, and C and E and calculated. Thesedifferences are then used to find the most similar lines, i.e. thelowest difference. In one embodiment, if all of the three differencesare above a certain threshold, then a notch filter may be used for theseparation.

The three error terms (the difference between pixels) come from thesubtraction of in-phase vectors:err _(—)3d=frame[−2]−frame[0]=|u[−2,0]−u[0]|+|v[−2,0]−v[0]|err _(—)3_ln=line[−1]−line[1]=|u[−0,−1]−u[0,1]|+|v[0,−1]−v[0,1]|err_prev=line[0]−line[−2]=|u[0,0]−u[0,−2]|+|v[0,0]−v[0,−2]|err_next=line[0]−line[2]=|u[0,0]−u[0,2]|+|v[0,0]−v[0,2]|where line[0] is defined as the current line, line[1] as the next line,line[−1] as the previous line and so on. A gross approximation of thevector size is used, but a more accurate estimation can be made using:err=max(|u_(diff)|,|v_(diff)|)+(⅜)*min(|u_(diff)|,|v_(diff)|).

Each of the error terms are compared to a threshold value if the enablefor that error term is active, which allows any of the comb terms to bedisabled by setting its enable to zero, or forced by setting all otherenables to zero. The priority in the event of a tie is 3D, three line,previous line, next line, and notch filter (band pass filtered line[0]).

The minimum error is used to select the comb from the combinationsbelow:c _(—)3d=½(frame[0]+frame[−1])c _(—)3_ln=¼((line[0]+line[1])+(line[0]+line[−1]))c_prev=½(line[0]+line[−1])c_next=½(line[0]+line[1])

For the purpose of chroma comb filter calculation in the NTSC mode,pixels that are one line apart may be used. For example, lines B, C andD can be used for comb filter calculation, as follows: C±B, C±D and2C±(B+D).

FIG. 8B illustrates input line A and two stored lines B and C, in thePAL mode. As shown, there is a 90° phase difference between A and B, andB and C. Further, there is a 180° phase difference between A and C andbetween C and E. In one embodiment of the present invention, the errorcalculation in the PAL mode can be obtained by the calculation shown inFIG. 8B. As shown, A and C are added to generated twice chroma or 2c,which is the subjected to a V switch. Further, C is subtracted from A togenerate twice luma or 2y, which is then subjected to a 90° rotation.When the results of these two calculations are added, the value that isachieved should be twice B (or 2B), which is referred to as 2B′. Next, Bis multiplied by 2 to obtain the actual 2B. Lastly, to determine theerror term, 2B′ is subtracted from 2B. Further, similar calculationsthat are performed using A/C/B, will also be performed using B/D/C andC/E/D to obtain two more error terms. The three error terms in PAL modemay then be used similar to the three error values obtained in NTSC modeabove.

As described above, in PAL mode, the algorithm for finding the errorterm is quite different, though the comb filtering is very similar. Asdiscussed, to find the error, the average chroma and luma vectors arefound for each possible combination. The luma vector is then rotated 90°in the proper direction. This can be either forward or back depending onwhether the check is for the previous or next line comb, and dependingon the PAL standard. The rotated luma is added to the chroma vector, andthe resultant vector is compared to the adjacent line or frame.

To compute the error terms the average chroma and luma components in theUV space are determined, as follows:cu _(—)3d=½(u[0,0]+u[−2,0]), cv _(—)3d=½(v[0,0]+v[−2,0])cu _(—)3_ln=½(u[0,1]+u[0,−1]), cv _(—)3_ln=½(v[0,1]+v[0,−1])cu_prev=½(u[0,0]+u[0,−2]), cv_prev= 1/2(v[0,0]+v[0,−2])cu_next=½(u[0,0]+u[0,2]), cv_next=½(v[0,0]+v[0,2])lu _(—)3d=½(u[0,0]−u[−2,0]), lv _(—)3d=½(v[0,0]−v[−2,0])lu _(—)3_ln=½(u[0,1]−u[0,−1]), lv _(—)3_ln=½(v[0,1]−v[0,−1])lu_prev=½(u[0,−2]−u[0,0]), lv_prev=½(v[0,0]−v[0,2])lu_next=½(u[0,2]−u[0,0]), lv_next=½(v[0,0]−v[0,2])

Next, the average luminance vectors are rotated by +/−90°, as shown:lu_(—)3d=lv_(—)3d, lv _(—)3d=−lu _(—)3dlu _(—)3_ln=−lv _(—)3_ln, lv_(—)3_ln=lu_(—)3_lnlu_prev=lv_prev, lv_prev=−lu_prevlu_next=−lv_prev, lv_next=lu_prev

Combining the luminance vector and the chrominance vector results in anaverage composite vector for the adjacent line or frame. However, thesevectors also have the opposite sign on the V component of the chroma dueto the PAL switch, which must be taken into account when combining theseterms. The error terms then are computed as the difference between thecomputed composite vectors, as shown here:err _(—)3d=|cu _(—)3d+lv _(—)3d−u[−1]|+|−cv _(—)3d−lu _(—)3d−v[−1]|err _(—)3_ln=|cu_next−lv _(—)3_ln−u[1]|+|−cv _(—)3_ln+lu _(—)3_ln−v[1]|err_prev=|cu_prev+lv_prev−u[−1]|+|−cv_prev−lu_prev−v[−1]|err_next=|cu_next−lv_next−u[1]|+|−cv_next+lu_next−v[1]|

In the PAL mode, pixel by pixel adaptation may be disabled, since threepixels are used in the error calculation, and it is possible for two todestructively interfere and cause an erroneously small result. Sinceonly one term is rotating, however, the odds of two successivecalculations canceling in this way are very low. For this reason, twominimum error terms in a row are required to change the mode. As in thecase of NTSC, if all of the enabled error terms are above a threshold,the notch filter is used. Otherwise one of the following operations areperformed:c _(—)3d=½(frame[0]+frame[−2])c _(—)3_ln=½((line[0]−line[−1])+(line[0]+line[1]))c_prev=½(line[0]+line[−2])c_next=½(line[0]+line[2])

For both NTSC and PAL modes, there are four modes of operation for thenotch filter. In its first mode of operation, the notch filter isdisabled, which forces the lowest error comb filter to be selected. Inthe second mode of operation, which can be referred to as chroma mode,the notch filter interprets anything that cannot be comb filtered aschroma. In the second mode, the bandpass filtered composite data isoutput to chroma remod 625 without any averaging, which produces strongcross-chroma artifacts with a high vertical chroma resolution. In thethird mode of operation or half mode, the notch filter splits data thatcannot be comb filtered into equal parts of luma and chroma. In oneembodiment, the half mode is the default mode of operation for the notchfilter, which has a 6 dB rejection of both cross-luma and cross-chromaartifacts. In the fourth mode of operation, which can be referred to asthe luma mode, the notch filter interprets non-comb filtered data asluminance, which has a strong cross-luma artifacts and a low verticalchroma resolution.

Continuing with FIG. 6, non-complimentary luma comb 620 is included toremove cross-luma artifacts from areas of high frequency chroma, sincesources such as DVD players and signal generators have chroma bandwidthsthat can exceed broadcast standards. The basic operation of luma comb620 is to low pass filter the full bandwidth composite data and subtracttwo adjacent lines or frames to find the error. If this error is below afirst threshold and the corresponding chroma comb error was also below asecond threshold, the two full bandwidth composite pixels are averagedtogether.

In one embodiment, chroma data and luma data for two adjacent lines orpixels can be obtained obtaining and then determined whether there is amatch or correlation between the two lines. If chroma comb filter 615indicates a correlation and luma comb filter 620 indicates nocorrelation, chroma comb filter 615 and luma comb filter 620 are used inthe complimentary mode, else if chroma comb filter 615 indicates acorrelation and luma comb filter 620 indicates a correlation, chromacomb filter 615 and luma comb filter 620 are used in thenon-complimentary mode. Further, if neither chroma comb filter 615 norluma comb filter 620 indicates a correlation, chroma comb filter 615 andluma comb filter 620 are disabled.

The low pass filters can be the same length as those used in the chromademodulator to preserve a pipeline delay of the two signals relative toeach other. There can also be three bandwidth settings. Since anyresidual chroma inside the bandwidth of the filter will be seen as twicethe error for being out-of phase, the bandwidth should not include anyof the chroma bandwidth. Generally, the higher the chroma bandwidth, thelower the bandwidth setting. Since the PAL carrier is higher than NTSC,higher settings can be used for PAL. Also, for PAL signals, the low passfilters take their input from frame[−2], line[−2] and line[2] to accessthe pixels with out-of-phase chroma. In all other respects, theoperations in PAL and NSTC are substantially identical. In oneembodiment, since the low pass filtered data is not be used for anythingother than error computation, it does not need to have 60 dB rejectionof the stop band.

Similar to chroma comb filter 615, luma comb filter 620 has variousenable signals for each of the combinations available to it. Since theerror term is generated over a relatively low bandwidth, luma comb 620artifacts are readily visible and the results of the chroma comb errorchecking algorithm are used as well. In other words, the chroma for thetwo pixels should be equal, as well as any non-chroma signals. Thus, tobe selected, the error must be below a threshold, and the mode must beenabled, but not necessarily selected, in chroma comb 615.

Since chroma comb filter 615 relies on in-phase pixels to compute error,but uses a different out-of-phase pixel for the actual comb filter, thiscan cause false detections in areas of high vertical frequency (2D), orareas of rapid oscillation in time (3D). Further, in the case of 3Dspatial-temporal aliasing may occur, where high vertical or horizontalfrequency combined with low frequency movement can cause erroneousresults. For 2D applications, however, the artifacts caused by theseanomalies may not be readily apparent, though in 3D applications suchartifacts can be apparent and, thus, an additional check is made todetermine if motion is present near the current pixel.

In the NTSC mode, the full bandwidth composite pixel is subtracted fromthe one two frames back, which is fed into a shift register the samelength as the low pass filter. An up/down counter counts the number ofones in the shift register, and this number is compared to a threshold.If exceeded, the circuit determines that too much motion is present inthe immediate area to reliably use the 3D comb filter.

Luma comb filter 620 modes are 3D, three-line, previous-line, next-lineand no-filter. In the no-filter mode, the full bandwidth signal isoutput to chroma remod 625, which allows a fallback to the complimentarycomb filter, which can remove the cross luma from within the chroma LPFbandwidth. In addition, the above-described notch filter can also beutilized. It should be noted that if any of the luma comb filters isused, an enable signal is sent to chroma remod 625 to prevent chromaremod 625 from subtracting the remodulated chroma from the luma signal.

Turning to chroma remod 620, if luma comb 620 is enabled for the currentpixel, chroma remod 625 simply passes both luma and chroma data through.Otherwise, comb filtered chroma vector is first quadrature modulatedback up to the sub-carrier frequency and then subtracted from thecomposite signal, to generate the luminance data. To this end, the exactphase and frequency of the original signal must be recreated, forexample, by a pipelined delayed 12-bit phase address from thesub-carrier generator to match the chroma signal. Since the trackingloop in subcarrier generator 614 is operating on the current line andcurrent frame, there is no need to delay the signal for more than thepipeline delay through chroma demod 610 and comb filter chroma filter615.

Since SECAM uses an FM modulated signal, a carrier is always present,regardless of whether or not color information is being broadcast, whichresults in a visible artifact in the luminance at the carrier frequency.To minimize this effect, an “Inverse Bell” filter is applied at theencoder to attenuate color frequencies near the Dr and Db carriers.Thus, if little or no color information is present in the signal, thecarriers will be reduced in amplitude. To properly decode the colorinformation, the receiver must undo the above process. The “Bell” filter630 is defined by standard to have the transfer function:

${11.5\frac{1 + {j\; 15F}}{1 + {j\; 1.26F}}\mspace{14mu}{where}\mspace{14mu} F} = {\frac{fsc}{4286000} - \frac{4286000}{fsc}}$

This bandpass filter was generated from a low pass prototype filter.Since the SECAM signal has been rotated to baseband already, theoriginal prototype filter can be used, which may be accomplished bytaking the real parts of the pole/zero pairs from the bandpass filter.The filter is then put through the bilinear transform to get the finaldigital filter coefficients. Since the signal is now in the UV space,the filter is complex, but the high-speed clock allows for the entirecircuit to be re-used for both U and V channels, except for the feedbackregister.

The methods and systems presented above may reside in software,hardware, and/or firmware on the device, which can be implemented on amicroprocessor, digital signal processor, application specific IC, orfield programmable gate array (“FPGA”), or any combination thereof,without departing from the spirit of the invention. Furthermore, thepresent invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive.

1. A method of decoding a video signal including a first video signalline and a second video signal line using a luma comb filter and achroma comb filter, said method comprising: obtaining a first chromadata for said first video signal line using said chroma comb filter;obtaining a second chroma data for said second video signal line usingsaid chroma comb filter, wherein said first video signal line isadjacent to said second video signal line; obtaining a first luma datafor said first video signal line using said luma comb filter; obtaininga second luma data for said second video signal line using said lumacomb filter; using said chroma comb filter and said luma comb filter ina complimentary mode if there is correlation between said first chromadata and said second chroma data and there is no correlation betweensaid first luma data and said second luma data; and using said chromacomb filter and said luma comb filter in a non-complimentary mode ifthere is correlation between said first chroma data and said secondchroma data and there is correlation between said first luma data andsaid second luma data.
 2. The method of claim 1 further comprising:disabling said chroma comb filter and said luma comb filter if there isno correlation between said first chroma data and said second chromadata and there is no correlation between said first luma data and saidsecond luma data.
 3. A method of SECAM bell filtering a video signal toseparate a luma component from a chroma component of said video signal,said method comprising: rotating said video signal down to basebandusing a chroma demodulator to obtain a baseband signal; low-passfiltering said baseband signal to generate a low-pass filtered basebandsignal; modulating said low-pass filtered baseband signal to generate amodulated low-pass filtered baseband signal; and subtracting saidmodulated low-pass filtered baseband signal from said video signal tonotch said chroma component from said luma component.
 4. The method ofclaim 3 further comprising: applying a bell filter to said modulatedlow-pass filtered baseband signal.
 5. A decoder for decoding a videosignal including a first video signal line and a second video signalline, said decoder comprising: a chroma comb filter configured to obtaina first chroma data for said first video signal line, and furtherconfigured to obtain a second chroma data for said second video signalline, wherein said first video signal line is adjacent to said secondvideo signal line; a luma comb filter configured to obtain a first lumadata for said first video signal line, and further configured to obtaina second luma data for said second video signal line using said lumacomb filter; wherein said decoder is configured to use said chroma combfilter and said luma comb filter in a complimentary mode if there iscorrelation between said first chroma data and said second chroma dataand there is no correlation between said first luma data and said secondluma data, and wherein said decoder is further configured to use saidchroma comb filter and said luma comb filter in a non-complimentary modeif there is correlation between said first chroma data and said secondchroma data and there is correlation between said first luma data andsaid second luma data.
 6. The decoder of claim 5, wherein said decoderis further configured to disable said chroma comb filter and said lumacomb filter if there is no correlation between said first chroma dataand said second chroma data and there is no correlation between saidfirst luma data and said second luma data.